<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of estatisticas
 *
 * @author root
 */
class Estatisticas {
    
    public function __construct() {
        
    }
    
    public function acesso_pagina($cod = 0,$tpo = 2){
        
        $front = Zend_Controller_Front::getInstance();
        $session = Zend_Auth::getInstance();
        
        $data = array(
            'ACE_URL'   => $_SERVER['SERVER_NAME'].$_SERVER["REQUEST_URI"],
            'ACE_CTL'   => $front->getRequest()->getControllerName(),
            'ACE_COD'   => $cod,
            'USU_ID'    => $session->getStorage()->read()->USU_ID,
            'ACE_DATHOR'=> date('Y-m-d H:i:s'),
            'ACE_TPO'   => $tpo, // 1 = EAD, 2 = SITE
        );
        $obj = new Ead_Model_DbTable_Acessopaginas();
        $obj->insert($data);
    }
}

?>
